package org.example.product.vo;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.example.core.valid.group.AddGroup;
import org.example.core.to.SpuBoundsTo;
import org.example.product.entity.SpuAttributeEntity;

import java.io.Serializable;
import java.util.List;

/**
 * @author 小杰_cc
 * @version 1.0
 */
@Data
public class SpuRestVo{
    /**
     * spuId
     */
    private Long spuId;
    /**
     * 标题
     */
    @NotBlank(message = "商品标题不能为空", groups = AddGroup.class)
    private String spuTitle;
    /**
     * 分类id
     */
    @NotNull(message = "分类id不能为空", groups = AddGroup.class)
    private Long categoryId;
    /**
     * 品牌id
     */
    @NotNull(message = "品牌id不能为空", groups = AddGroup.class)
    private Long brandId;
    /**
     * 排序
     */
    @Min(value = 0,message = "排序字段必须是一个大于等于0的数", groups = AddGroup.class)
    private Integer sort;
    /**
     * spu产品参数
     */
    private List<SpuAttributeEntity> attrParamsArray;
    /**
     * spu详细描述
     */
    private String content;
    /**
     * sku商品集合
     */
    @NotEmpty(message = "商品sku不能不空", groups = AddGroup.class)
    private List<SkuRestVo> skus;
}
